﻿/*  
 * Helix Engine
 * http://helixengine.codeplex.com/
 * 
 * Copyright (c) 2010 - 2011 Joe Hegarty
 *  
 * This source code is subject to the terms of the Microsoft Public License (Ms-PL). 
 *  
 * Redistribution and use in source and binary forms, with or without modification, 
 * is permitted provided that redistributions of the source code retain the above 
 * copyright notices and this file header. 
 * 
 * For details please see http://www.opensource.org/licenses/ms-pl.html 
 *  
 * All other rights reserved. 
 *
 */  


using System;

namespace HelixEngine.Maths
{
    /// <summary>
    /// 
    /// </summary>
    public sealed class EngineTime
    {
        TimeSpan _elapsedEngineTime;
        TimeSpan _elapsedRealTime;
        TimeSpan _totalEngineTime;
        TimeSpan _totalRealTime;
        bool _isRunningSlowly;

        /// <summary>
        /// 
        /// </summary>
        public EngineTime()
        {
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="totalRealTime"></param>
        /// <param name="elapsedRealTime"></param>
        /// <param name="totalEngineTime"></param>
        /// <param name="elapsedEngineTime"></param>
        public EngineTime(TimeSpan totalRealTime, TimeSpan elapsedRealTime, TimeSpan totalEngineTime, TimeSpan elapsedEngineTime)
            : this(totalRealTime, elapsedRealTime, totalEngineTime, elapsedEngineTime, false)
        {
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="totalRealTime"></param>
        /// <param name="elapsedRealTime"></param>
        /// <param name="totalEngineTime"></param>
        /// <param name="elapsedEngineTime"></param>
        /// <param name="isRunningSlowly"></param>
        public EngineTime(TimeSpan totalRealTime, TimeSpan elapsedRealTime, TimeSpan totalEngineTime, TimeSpan elapsedEngineTime, bool isRunningSlowly)
        {
            _totalRealTime = totalRealTime;
            _elapsedRealTime = elapsedRealTime;
            _totalEngineTime = totalEngineTime;
            _elapsedEngineTime = elapsedEngineTime;
            _isRunningSlowly = isRunningSlowly;
        }

        /// <summary>
        /// 
        /// </summary>
        public TimeSpan ElapsedEngineTime
        {
            get
            {
                return _elapsedEngineTime;
            }

            set
            {
                _elapsedEngineTime = value;
            }
        }

        /// <summary>
        /// 
        /// </summary>
        public TimeSpan ElapsedRealTime
        {
            get
            {
                return _elapsedRealTime;
            }

            set
            {
                _elapsedRealTime = value;
            }
        }

        /// <summary>
        /// 
        /// </summary>
        public bool IsRunningSlowly
        {
            get
            {
                return _isRunningSlowly;
            }
            set
            {
                _isRunningSlowly = value;
            }
        }

        /// <summary>
        /// 
        /// </summary>
        public TimeSpan TotalEngineTime
        {
            get
            {
                return _totalEngineTime;
            }

            set
            {
                _totalEngineTime = value;
            }
        }

        /// <summary>
        /// 
        /// </summary>
        public TimeSpan TotalRealTime
        {
            get
            {
                return _totalRealTime;
            }

            set
            {
                _totalRealTime = value;
            }
        }

    }
}
